﻿using TomNet.App.Model.DTO;
using TomNet.SqlSugarCore.Entity;

namespace TomNet.App.Model.DB
{
    /// <summary>
    /// 订单信息
    /// </summary>
    public class Business : IdentityEntityBase<int>
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserId { get; set; }

        /// <summary>
        /// 商品Id
        /// </summary>
        public int ProductId { get; set; }

        /// <summary>
        /// 矿机名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 算力
        /// </summary>
        public decimal Hashrate { get; set; }

        /// <summary>
        /// 功耗
        /// </summary>
        public decimal Kwh { get; set; }

        /// <summary>
        /// 电费（元）
        /// </summary>
        public decimal ElectricCharge { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        public string Image { get; set; }

        /// <summary>
        /// 购买数量
        /// </summary>
        public int Number { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public decimal Price { get; set; }

        /// <summary>
        /// 交易金额
        /// </summary>
        public decimal Amount { get; set; }

        /// <summary>
        /// 是否被激活
        /// </summary>
        public bool IsActivation { get; set; }

        /// <summary>
        /// 激活日期 什么时候开始计算收益
        /// </summary>
        public System.DateTime ActivationTime { get { return _activationtime; } set { _activationtime = value; } }
        System.DateTime _activationtime = System.DateTime.Now;

        /// <summary>
        /// 购买日期
        /// </summary>
        public System.DateTime CreatedTime { get { return _createdtime; } set { _createdtime = value; } }
        System.DateTime _createdtime = System.DateTime.Now;

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 状态
        /// 1 开机
        /// 2 关机
        /// 3 停机
        /// </summary>
        public int State { get; set; }
    }
}
